package com.kehutong.charge.entity;

import com.kehutong.charge.util.enums.ChargeOrderStatusEnum;
import com.kehutong.charge.util.enums.CommonEnum;
import org.coraframework.json.annotation.JSONField;
import org.coraframework.orm.Entity;
import org.coraframework.orm.annotation.Column;
import org.coraframework.orm.annotation.Table;
import org.coraframework.orm.util.IDType;

import java.math.BigDecimal;
import java.sql.Timestamp;

/**
 * @program: kht
 * @description: ChargeOrderManage
 * @author: joneron
 * @create: 2021/7/5
 **/
@Table(value="t_charge_pay_manage", comment="支付管理表",multi = true, idType = IDType.TIMESTAMP, engine = "innodb")
public class ChargePayManage extends Entity {


    protected ChargePayManage(String id) {
        super(id);
    }

    @Column(comment="支付关联编号")
    private String payManageNo;

    @Column(comment="企业（公司）编号")
    private String companyNo;

    @Column(comment="企业（公司）名称")
    private String companyName;

    @Column(comment="微信交易类型[JSAPI,NATIVE,APP]")
    private String tradeType;

    @Column(comment="支付方式")
    private CommonEnum payMethod;

    @Column(comment="订单来源")
    private CommonEnum orderOrigin;

    @Column(comment="小区编号")
    private String communityNo;

    @Column(comment="订单编号")
    private String orderNo;

    @Column(comment="类目编号")
    private String itemBillNo;

    @Column(comment="第三方订单编号")
    private String orderNoThird;

    @Column(comment="付款人")
    private String chargeName;

    @Column(comment="付款人编号")
    private String userNo;

    @Column(comment="订单金额")
    private BigDecimal orderAmount;

    @Column(comment="订单状态")
    private ChargeOrderStatusEnum status;

    @Column(comment="回调地址")
    private String notifyUrl;

    @Column(comment="body内容")
    private String body;

    @Column(length =2000, comment="内容")
    private String attach;

    @Column(comment="支付时间")
    private Timestamp payTime;


    /** 支付商户信息 */

    @Column(comment = "商户id")
    private String mchId;

    @Column(comment = "商户名称")
    private String mchName;

    @Column(comment = "子商户id")
    private String subMchId;

    @Column(comment = "子商户名称")
    private String submchName;

    @Column(comment = "付款银行")
    private String bankType;

    @Column(comment = "商品id, NATIVE交易类型必传")
    private String productId;

    @Column(length = 64, comment = "微信生成的预支付会话标识")
    private String prepayId;

    @Column(length = 64, comment = "NATIVE交易类型生成的支付二维码")
    private String codeUrl;

    @Column(length = 128, comment = "用户在商户appid下的唯一标识")
    private String openId;

    @Column(length = 64, comment = "微信支付订单号")
    private String transactionId;

    @Column(comment="创建IP地址")
    private String createIp;

    @Column(comment="创建人")
    private String createName;

    @Column(comment="修改人")
    private String updateName;

    @JSONField(serialize = false)
    @Column(comment = "逻辑删除")
    private boolean deleted;


    public String getUserNo() {
        return userNo;
    }

    public void setUserNo(String userNo) {
        this.userNo = userNo;
    }

    public Timestamp getPayTime() {
        return payTime;
    }

    public void setPayTime(Timestamp payTime) {
        this.payTime = payTime;
    }

    public String getCompanyName() {
        return companyName;
    }

    public void setCompanyName(String companyName) {
        this.companyName = companyName;
    }

    public String getItemBillNo() {
        return itemBillNo;
    }

    public void setItemBillNo(String itemBillNo) {
        this.itemBillNo = itemBillNo;
    }

    public String getPayManageNo() {
        return payManageNo;
    }

    public void setPayManageNo(String payManageNo) {
        this.payManageNo = payManageNo;
    }

    public String getCreateIp() {
        return createIp;
    }

    public void setCreateIp(String createIp) {
        this.createIp = createIp;
    }

    public String getBody() {
        return body;
    }

    public void setBody(String body) {
        this.body = body;
    }

    public String getAttach() {
        return attach;
    }

    public void setAttach(String attach) {
        this.attach = attach;
    }

    public String getCompanyNo() {
        return companyNo;
    }

    public void setCompanyNo(String companyNo) {
        this.companyNo = companyNo;
    }

    public String getCommunityNo() {
        return communityNo;
    }

    public void setCommunityNo(String communityNo) {
        this.communityNo = communityNo;
    }

    public String getOrderNo() {
        return orderNo;
    }

    public void setOrderNo(String orderNo) {
        this.orderNo = orderNo;
    }

    public String getOrderNoThird() {
        return orderNoThird;
    }

    public void setOrderNoThird(String orderNoThird) {
        this.orderNoThird = orderNoThird;
    }

    public String getChargeName() {
        return chargeName;
    }

    public void setChargeName(String chargeName) {
        this.chargeName = chargeName;
    }

    public BigDecimal getOrderAmount() {
        return orderAmount;
    }

    public void setOrderAmount(BigDecimal orderAmount) {
        this.orderAmount = orderAmount;
    }

    public ChargeOrderStatusEnum getStatus() {
        return status;
    }

    public void setStatus(ChargeOrderStatusEnum status) {
        this.status = status;
    }

    public String getUpdateName() {
        return updateName;
    }

    public void setUpdateName(String updateName) {
        this.updateName = updateName;
    }

    public boolean isDeleted() {
        return deleted;
    }

    public void setDeleted(boolean deleted) {
        this.deleted = deleted;
    }

    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    public String getTradeType() {
        return tradeType;
    }

    public void setTradeType(String tradeType) {
        this.tradeType = tradeType;
    }

    public CommonEnum getPayMethod() {
        return payMethod;
    }

    public void setPayMethod(CommonEnum payMethod) {
        this.payMethod = payMethod;
    }

    public CommonEnum getOrderOrigin() {
        return orderOrigin;
    }

    public void setOrderOrigin(CommonEnum orderOrigin) {
        this.orderOrigin = orderOrigin;
    }

    public String getNotifyUrl() {
        return notifyUrl;
    }

    public void setNotifyUrl(String notifyUrl) {
        this.notifyUrl = notifyUrl;
    }

    public String getMchId() {
        return mchId;
    }

    public void setMchId(String mchId) {
        this.mchId = mchId;
    }

    public String getMchName() {
        return mchName;
    }

    public void setMchName(String mchName) {
        this.mchName = mchName;
    }

    public String getSubMchId() {
        return subMchId;
    }

    public void setSubMchId(String subMchId) {
        this.subMchId = subMchId;
    }

    public String getSubmchName() {
        return submchName;
    }

    public void setSubmchName(String submchName) {
        this.submchName = submchName;
    }

    public String getBankType() {
        return bankType;
    }

    public void setBankType(String bankType) {
        this.bankType = bankType;
    }

    public String getProductId() {
        return productId;
    }

    public void setProductId(String productId) {
        this.productId = productId;
    }

    public String getPrepayId() {
        return prepayId;
    }

    public void setPrepayId(String prepayId) {
        this.prepayId = prepayId;
    }

    public String getCodeUrl() {
        return codeUrl;
    }

    public void setCodeUrl(String codeUrl) {
        this.codeUrl = codeUrl;
    }

    public String getTransactionId() {
        return transactionId;
    }

    public void setTransactionId(String transactionId) {
        this.transactionId = transactionId;
    }

    public String getCreateName() {
        return createName;
    }

    public void setCreateName(String createName) {
        this.createName = createName;
    }
}
